from medical_food import MedicalFoodHandler
import os
import logging

logging.basicConfig(level=logging.INFO, format='%(asctime)s [%(levelname)s] %(message)s')


if __name__ == "__main__":
    

    medical_food_handler = MedicalFoodHandler(food_path="competition")
    
    medical_food_handler.preprocessing_nutritional_from_pdfs()
    medical_food_handler.preprocessing_product_category()
    medical_food_handler.group_by_year_and_from()
    medical_food_handler.create_sunburst_chart()
    medical_food_handler.plot_product_category_counts()
    medical_food_handler.plot_fat_protein_histograms() 
    medical_food_handler.generate_wordcloud()
    medical_food_handler.content_based_recommendation("10岁儿童 需要补充蛋白质 乳糖不耐受")
    medical_food_handler.content_based_recommendation("婴儿 蛋白质过敏")
    